﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DesignPatternDemoCApp.Structured.CompositePattern
{
    /// <summary>
    /// SonFolder类型就是树枝构件，现在由于我们使用的是“安全式”，所以Add,Remove都是从此处开始定义的
    /// </summary>
    public class SonFolder : Folder
    {
        public override void Add(Folder folder)
        {
            Console.WriteLine("文件或者文件夹已经增加成功");
        }

        public override void Open()
        {
            Console.WriteLine("文件或者文件夹已经删除成功");
        }

        public override void Remove(Folder folder)
        {
            Console.WriteLine("已经打开当前文件夹");
        }
    }
}
